<?php
class Application_Model_DbTable_Country extends Zend_Db_Table_Abstract{
    protected $_name = "country";
    protected $_primary = "country_id";
    
    public function getList(){
        return $this->fetchAll();
    }
    
    public function getCountry($countryId){
        return $this->fetchRow("country_id = ".$countryId);
    }
    
    public function convertArray(&$array){
        foreach($array as $key => $item){
        $array[$key]['countryId'] = $array[$key]['country_id'];
        $array[$key]['name'] = $array[$key]['name'];
        }
    }
    
    public function convertItem (&$item){
        $array['countryId'] = $array['country_id'];
        $array['name'] = $array['name'];
    }
}